home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / c / sozobon / sozlib15.zoo / sozdistr / include / ltmf_lib.h next >
Encoding:
C/C++ Source or Header  |  1994-12-04  |  3.2 KB  |  93 lines

  1. /* --------------------------------------------------------------------- */
  2. /* ----- Let 'em Fly! Library ----------- (c) 1991-92 by Oliver Scheel - */
  3. /* --------------------------------------------------------------------- */
  4.     /* changed for __SOZOBONX__ 0x223  -jerry: 1994/12/01     */
  5.  
  6. #if (SOZOBON  && __SOZOBONX__ < 0x223)
  7. #error "works only with hcc v2.00x23 :: bitfields"
  8. #else
  9. #define STDARGS
  10. #define VOID        void
  11.  
  12. #endif
  13.  
  14. #ifndef __LTMFLIB__
  15. #define __LTMFLIB__
  16.  
  17.  
  18.  
  19. /* --------------------------------------------------------------------- */
  20. /* ----- Let 'em Fly! Structure ---------------------------------------- */
  21. /* --------------------------------------------------------------------- */
  22.  
  23. typedef struct
  24. {
  25.     UWORD    version;    /* BCD format        */
  26.     struct
  27.     {
  28.         unsigned light    : 1;    /* light version (read)    */
  29.         unsigned niceln    : 1;    /* niceline        */
  30.         unsigned jumpin    : 1;    /* jumpin' dials    */
  31.         unsigned flyswi    : 1;    /* conf. flymode switch    */
  32.         unsigned vscr    : 1;    /* virtual scr. support    */
  33.         unsigned center : 1;    /* center mode        */
  34.         unsigned keys    : 1;    /* key handling        */
  35.         unsigned edit    : 1;    /* extended editor    */
  36.         unsigned redraw    : 1;    /* send redraw message    */
  37.         unsigned flytyp    : 1;    /* solid/hollow fly    */
  38.         unsigned fly    : 1;    /* flying on/off    */
  39.         unsigned alert    : 1;    /* alerts/errors on/off    */
  40.         unsigned mouse    : 1;    /* use virtual memory    */
  41.         unsigned f_grow    : 1;    /* grow/shrink boxes    */
  42.         unsigned g_grow : 1;    /* dials to mouse    */
  43.         unsigned bypass : 1;    /* ON/OFF highest prio    */
  44.     } config;
  45.     WORD    conf2;            /* reserved         */
  46.     WORD    reserved;        /* reserved         */
  47.     VOID    STDARGS    (*di_fly)(OBJECT *tree);
  48.     VOID    STDARGS    (*obj_clsize)(OBJECT *tree, WORD obj, WORD *x, WORD *y, WORD *w, WORD *h);
  49.     WORD    STDARGS    (*do_key)(WORD key, WORD kshift);
  50.     WORD    STDARGS    (*init_keys)(OBJECT *tree);
  51.     WORD    STDARGS    (*lookup_key)(WORD key, WORD kshift);
  52.     WORD    STDARGS    (*di_moveto)(OBJECT *tree, WORD mx, WORD my);
  53.     WORD    STDARGS    (*di_center)(OBJECT *tree);
  54.     WORD    ucol;    /* underscore color    */
  55.     WORD    aicol;    /* alert icon color    */
  56.     WORD    aframe;    /* alert frame size    */
  57.     WORD    flydelay;    /* delay before flying (form_do()-only)    */
  58.     WORD    STDARGS    (*hist_insert)(CHAR *string);
  59.     CHAR    STDARGS    (*ins_spcchar)(VOID);
  60.     VOID    STDARGS    (*init_niceline)(OBJECT *tree);
  61. } LTMFLY;
  62.  
  63. /* --------------------------------------------------------------------- */
  64.  
  65. extern    LTMFLY    *letemfly;
  66.  
  67. /* --------------------------------------------------------------------- */
  68. /* ----- Prototypes ---------------------------------------------------- */
  69. /* --------------------------------------------------------------------- */
  70.  
  71. WORD ltmf_check(UWORD version);
  72. WORD di_fly(OBJECT *tree);
  73. WORD obj_clsize(OBJECT *tree, WORD obj, WORD *x, WORD *y, WORD *w, WORD *h);
  74. WORD init_keys(OBJECT *tree);
  75. WORD lookup_key(WORD key, WORD kbshift);
  76. WORD set_do_key(WORD STDARGS (*key_handler)());
  77. WORD di_moveto(OBJECT *tree, WORD x, WORD y);
  78. WORD di_center(OBJECT *tree);
  79. CHAR ins_spcchar(VOID);
  80. WORD hist_insert(CHAR *string);
  81. WORD init_niceline(OBJECT *tree);
  82. WORD init_flyobj(OBJECT *tree);
  83.  
  84.  
  85. /* some useful defines ... */
  86.  
  87. #define fly_check(tree)        di_moveto(tree, -1, 0)
  88. #define redraw_check(tree)    di_moveto(tree, -2, 0)
  89.  
  90. #endif
  91.  
  92. /* ----------------------------------------------------------------------*/
  93.